import sqlite3

def check_cash_flow_data():
    """检查cash_flow表中的数据"""
    try:
        with sqlite3.connect('investment_history.db') as conn:
            cursor = conn.cursor()
            cursor.execute('SELECT * FROM cash_flow')
            rows = cursor.fetchall()
            
            print('cash_flow表中的数据:')
            print('flow_id | user_id | asset_id | flow_type | amount | channel | fee | created_at | note')
            print('-' * 100)
            for row in rows:
                print(row)
    except sqlite3.Error as e:
        print(f"查询数据时发生错误: {e}")

if __name__ == "__main__":
    check_cash_flow_data()